<template>
<div class="pagination">
    <el-pagination
      @size-change="handleSizeChange"  @current-change="handleCurrentChange"
      :current-page="currentPage"  :page-sizes="[1, 5, 10, 30,50]"
      :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div>
</template>
<script>
export default {
  name: "Pagination",
  props:{
    pageSize:{
       type:Number,
       default:10
    },
    total:{
       type:Number,
       default:100
    }
  },
  data(){
    return{
       currentPage:1,
      //  pageSize:10,
      //  total:10,
    }
  },
  methods:{
    handleCurrentChange(val){
       this.$emit('getPagination',val)
    },
    handleSizeChange(val){
       console.log('22',val);
    },
  }
}
</script>

<style lang="less" scoped>
.pagination{
  margin-top:10px;
}
</style>